﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SiteManager.aspx.cs" Inherits="SiteManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <asp:GridView ID="grv_Category" runat="server" AutoGenerateColumns="false" 
        DataKeyNames="category_id" onrowediting="grv_Category_RowEditing" 
        onrowcancelingedit="grv_Category_RowCancelingEdit" 
        onrowdeleting="grv_Category_RowDeleting" 
        onrowupdating="grv_Category_RowUpdating" AllowPaging="true" 
        onpageindexchanging="grv_Category_PageIndexChanging"  PageSize="10" >
        
    <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:CheckBox ID="chk_all" runat="server" OnCheckedChanged = "onCheckedChanged" AutoPostBack="true"/> 
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="chk_item" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Category ID">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%#Eval("category_id") %>'></asp:Label>
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Name">                
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%#Eval("name") %>'></asp:Label>
                </ItemTemplate>
             </asp:TemplateField>
             
             <asp:CommandField ShowEditButton="true" />
             <asp:CommandField ShowDeleteButton="true" />
             
        </Columns>
    </asp:GridView>
    </asp:Content>

